

<link rel="stylesheet" href="popup/reveal.css">	

<!-- Attach necessary scripts -->
<!-- <script type="text/javascript" src="jquery-1.4.4.min.js"></script> -->
<!--<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.min.js"></script>-->
<!--<script type="text/javascript" src="popup/jquery-1.6.2.js"></script>--> 
<script type="text/javascript" src="popup/jquery.reveal.js"></script>
<script type="text/javascript">
//alert('ok');
function setCookie(c_name, value, exdays) {
    var exdate = new Date();
    exdate.setDate(exdate.getDate() + exdays);
    var c_value = escape(value) + ((exdays == null) ? "" : "; expires=" + exdate.toUTCString());
    document.cookie = c_name + "=" + c_value;
}

function getCookie(c_name) {
    var c_value = document.cookie;
    var c_start = c_value.indexOf(" " + c_name + "=");
    if (c_start == -1) {
        c_start = c_value.indexOf(c_name + "=");
    }
    if (c_start == -1) {
        c_value = null;
    }
    else {
        c_start = c_value.indexOf("=", c_start) + 1;
        var c_end = c_value.indexOf(";", c_start);
        if (c_end == -1) {
            c_end = c_value.length;
        }
        c_value = unescape(c_value.substring(c_start, c_end));
    }
    return c_value;
}

function showModal() {
   
   // Check if cookie existes
    var expireDate = getCookie("showpopup");
    var today = new Date().toUTCString();
    //alert(expireDate);
    if (expireDate != null && expireDate > today) {
        //Do nothing!
		//alert("The popup show 1 time already please wait the next day");
    }
    else {
        //ShowPopup here!
        $('#myModal').reveal();
        //Create cookie
        setCookie("showpopup", "anything", 1);
    }
	//To delete a cookie 
	//setCookie("showpopup","",-1);
		
    ///$('#myModal').closeReveal()
    
   //$('#myModal').reveal();
   
   setTimeout(function(){
	   $('#myModal').trigger('reveal:close');
   },6000); 
   // 5 seconds
    
}        
</script>

<div id="myModal" class="reveal-modal">
	<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d3881.8484166433745!2d103.85998000000001!3d13.3597!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x311017716e2b49ed%3A0xc987efdbd9a892d2!2sLynnaya+Boutique+Hotel!5e0!3m2!1sen!2s!4v1401069491357" 
    frameborder="0" style="border:0; width:100%; height:400px;"></iframe>
    <a class="close-reveal-modal"><img src="popup/x-close-01.png"></a>
</div>
